<?php
/*
 * Created on Dec 2, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
class CartProduct
{
	private $id;
	private $name;
	
	private $price;
	private $finalPrice;
	
	private $model;
	private $quantity;
	
	private $imageFileName;
	
	private $shippingTypeID;
	
	private $attributelist = array();
	
	public function CartProduct()
	{
		
	}
	
	public function setAttribute($objAttribute)
	{
		$this->attributelist[$objAttribute->getID()] = $objAttribute;
	}
	
	public function getAttributeList()
	{
		return $this->attributelist;
	}
	
	
	public function setID($id)
	{
		$this->id = $id;
	}
	
	public function getID()
	{
		return $this->id;
	}
	
	
	public function setName($name)
	{
		$this->name = $name;
	}
	
	public function getName()
	{
		return $this->name;
	}
	
	public function setPrice($price)
	{
		$this->price = $price;
	}
	
	public function getPrice()
	{
		return $this->price;
	}
	
	public function setFinalPrice($finalPrice)
	{
		$this->finalPrice = $finalPrice;
	}
	
	public function getFinalPrice()
	{
		return $this->finalPrice;
	}
	
	public function setQuantity($quantity)
	{
		$this->quantity = $quantity;
	}
	
	public function getQuantity()
	{
		return $this->quantity;
	}
	
	public function setModel($model)
	{
		$this->model = $model;
	}
	
	public function getModel()
	{
		return $this->model;
	}
	
	public function setImageFileName($imageFileName)
	{
		$this->imageFileName = $imageFileName;
	}
	
	public function getImageFileName()
	{
		return $this->imageFileName;
	}
	
	public function setShippingTypeID($shippingTypeID)
	{
		$this->shippingTypeID = $shippingTypeID;
	}
	
	public function getShippingTypeID()
	{
		return $this->shippingTypeID;
	}
	
	public function getAttributePrice()
	{
		$attributePrice = 0;
		
		foreach($this->attributelist as $attribute){
			$attributePrice += $attribute->getPrice();
		}
		
		return $attributePrice;
	}
}
?>
